package com.tianji.remark.controller;


import com.tianji.remark.domain.dto.LikeRecordFormDTO;
import com.tianji.remark.service.ILikedRecordService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 点赞记录表 前端控制器
 * </p>
 *
 * @author tc
 * @since 2023-04-16
 */
@RestController
@RequestMapping("/liked-record")
@RequiredArgsConstructor
public class LikedRecordController {

    private  final ILikedRecordService recordService;


    @PostMapping("/likes")
    public void  LikedRemark(@RequestBody LikeRecordFormDTO formDTO){
        recordService.likedRemark(formDTO);
    }


    @GetMapping("/likes/list")
    public Set<Long> userLiked(@RequestParam List<Long> bizIds){
        return recordService.userLiked(bizIds);
    }

}
